package modules
{
import framework.core.ComponentBuilder;

import modules.citysection.ICitySectionUI;
import modules.citysection.bottom.CitySectionBottomUIProxy;
import modules.citysection.left.CitySectionLeftUIProxy;
import modules.citysection.right.CitySectionRightUIProxy;
import modules.citysection.top.CitySectionTopUIProxy;
import modules.citysection.world.CitySectionWorldContainerProxy;

import view.hero.HeroUI;
import view.interfaces.IHeroUI;
import view.interfaces.IInventoryUI;
import view.interfaces.IShopUI;
import view.interfaces.ISkillUI;
import view.skill.SkillUI;

/**
 * CitySectionModule
 * @author jliang
 *
 */
public class CitySectionModule extends SectionModuleBase implements ICitySectionUI
{
	//==========================================================================
	//  Constructor
	//==========================================================================
	public function CitySectionModule()
	{
		super();
	}
    //==========================================================================
    //  Properties
    //==========================================================================
    public function get shopUI():IShopUI
    {
        return Game.instance.shopUI;
    }    
    
    public function get inventoryUI():IInventoryUI
    {
        return Game.instance.inventoryUI;
    }
    
    public function get skillUI():ISkillUI
    {
        return Game.instance.skillUI;
    }
    
    public function get heroUI():IHeroUI
    {
        return Game.instance.heroUI;
    }
	//==========================================================================
	//  Overridden methods: ModuleBase
	//==========================================================================
    override protected function get topUIReference():Class
    {
        return CitySectionTopUIProxy;
    }
    
    override protected function get leftUIReference():Class
    {
        return CitySectionLeftUIProxy;
    }
    
    override protected function get rightUIReference():Class
    {
        return CitySectionRightUIProxy;
    }
    
    override protected function get bottomUIReference():Class
    {
        return CitySectionBottomUIProxy;
    }
    
    override protected function get worldContainerReference():Class
    {
        return CitySectionWorldContainerProxy;
    }
    
    override protected function get skinReference():String
    {
        return "swf.ui.CitySectionUISkin";
    }
    
	override protected function initConfigComplete():void
	{
		super.initConfigComplete();
        
        initUI();
        
        inited();
	}
    
    override public function resize(widthOffset:Number, heightOffset:Number):void
    {
        topUI.displayObject.y -= int(heightOffset / 2);
        bottomUI.displayObject.y += int(heightOffset / 2);
    }
}
}



